1. Field of the Invention
The present invention relates to an image sensing apparatus and method of controlling this apparatus. More particularly, the invention relates to an image sensing apparatus having an autofocus function and a method of controlling this apparatus.
2. Description of the Related Art
In order to capture an image with optimum focus in an image sensing apparatus such as a digital camera or digital video camera, an autofocus scheme widely employed in the prior art involves using the central portion of a screen as a focus detection zone and focusing on a subject that is within this zone. A well-known method of performing such focusing involves detecting the in-focus state utilizing the nature that high-frequency components, which are contained in the image sensor output that corresponds to the focus detection zone, become largest at the in-focus position (e.g., see the specification of Japanese Patent Application Laid-Open No. 3-1668).
Further, the following method has been disclosed in the specification of Japanese Patent Application Laid-Open No. 2000-152065 in order to perform rapid focusing in a case where the above-mentioned method is applied to a still camera: First, an image is sensed at prescribed intervals while a focusing lens is moved from a position (referred to below as an “infinite-limit position”), at which infinite distance is brought into focus, to a position (referred to as a “nearest-limit position” below), at which point-blank distance is brought into focus. An evaluation value for determining focus is found based upon a plurality of images thus obtained by image sensing and information relating to these images, the focusing lens is moved to a position at which the evaluation value is maximized, and shooting and recording are performed.
However, a certain problem arises in the above-described autofocus method. Specifically, if the subject within the focus detection zone of one screen is displaced from the focus detection zone by camera shake while the plurality of images are being captured in order to obtain the evaluation value for autofocus, a correct evaluation value cannot be obtained and the subject will be out of focus.
This problem will be described with reference to FIGS. 5A and 5B.
FIG. 5A illustrates the positional relationship between a subject and background in the absence of camera shake. In the example depicted in FIG. 5A, the focus detection zone resides within a building surrounding a person. By contrast, in FIG. 5B, the focus detection zone has been shifted to the right relative to the subject by camera shake and the focus detection zone has emerged from within the building and now includes the outside wall on the right side.
FIGS. 6A and 6B are graphs illustrating the relationship between focusing-lens position and evaluation value when evaluation values are acquired regarding the subject shown in FIGS. 5A and 5B, respectively. FIG. 6A is a graph obtained in the absence of camera shake. In this case, the evaluation values peak when the subject is in focus. On the other hand, FIG. 6B is a graph in a case where camera shake has occurred at a focusing-lens position where the building in the background is brought into focus and the focus detection zone has shifted in the manner illustrated in FIG. 5B. In this case, the shifted focus detection zone includes the high-contrast outside wall portion of the building. As a consequence, the evaluation value peaks when the building has been brought into focus and the in-focus position is detected erroneously.
A conceivable method of solving this problem is to deal with camera shake by shifting the screen using a camera-shake correction function. However, the camera shake correction is processing whereby shaking of displayed video is corrected in such a manner that the image will not look strange as seen from the photographer or observer. Further, it is a technique that eliminates shaking of video in the entirety of the screen. Since this is not a technique that eliminates the shaking of the subject in the focus detection zone at the time of focusing, it leaves the above-described problem unsolved.